package com.ctshk.rpc.starvip.factory.member;

import com.ctshk.rpc.starvip.dto.start_vip.member.ListOfMembers;
import com.ctshk.rpc.starvip.dto.start_vip.member.Member;
import com.ctshk.rpc.starvip.dto.start_vip.member.MemberOperation;
import com.ctshk.rpc.starvip.factory.StarVipReqProvider;
import com.ctshk.rpc.starvip.req.member.MemberChangePasswordReq;
import com.google.common.collect.Lists;

/**
 * @BelongsProject: ctshk-cloud
 * @BelongsPackage: com.ctshk.rpc.starvip.factory.member
 * @Author: hef
 * @CreateTime: 2021-04-12 19:55
 * @Description: 修改会员密码
 */
public class MemberChangePasswordFactory extends StarVipReqProvider<MemberChangePasswordReq> {
    public MemberChangePasswordFactory(MemberChangePasswordReq memberChangePasswordReq) {
        super(memberChangePasswordReq);
    }

    @Override
    public MemberOperation produce() {
        MemberOperation memberOperation = new MemberOperation();
        memberOperation.setListOfMembers(new ListOfMembers(
                Lists.newArrayList(
                        new Member()
                                .setId(req.getId())
                                .setCtsPassword(req.getCtsPassword())
                                .setMemberType(req.getMemberType())
                )
        ));
        memberOperation.setMessageId("1-FVJ2");
        memberOperation.setIntObjectName("CST Reset Password");
        memberOperation.setInterfaceId("CTS_IF_10");
        memberOperation.setOperation("Update");
        memberOperation.setMessageType("Integration Object");
        memberOperation.setIntObjectFormat("Siebel Hierarchical");
        return memberOperation;
    }
}
